<?php
   require("EasyPHP.php"); 
 


   

   
   //初始化数据库参数

$_POST["id"]=3;
$_POST["title"]="为保'\\啊";



$easy=new EasyPHP(array("db_name"=>"bbs2","db_pwd"=>"1016"));

//$easy->dbcache->set("EasyPHP",$easy);
//$dd= $easy->dbcache->get("EasyPHP");

//$easy->writefile("bb.php",$easy->dbcache->get("EasyPHP"));

//$easy->cache->set("self", ($easy->getcontent("http://news.163.com")));
//$easy->out(( $easy->cache->get("self")));







//$rs=$easy->db->query2array("SELECT * from dv_bbs2 where topic = '我们' limit 10");
//$easy->db->query2array("SELECT * from dv_bbs2 where topic like '我%' limit 10000",true,false);

//$easy->dump($rs);

//$easy->dump(count($rs));
//$easy->cache->clear();

//echo $easy->db->buildInsertSql(array("host"=>"127.0.0.1","port"=>"3306","user"=>"root","pwd"=>"","db"=>"test","charset"=>"utf8"));
//echo $easy->db->buildUpdateSql(array("aa:100","bb:200"));

//while($row=mysql_fetch_row($rs))
//print_r($row);

//echo $easy->substring("为想.dfsd你我,sdfsdf",0,3);

//echo $easy->readfile("log.txt","r");

//echo $easy->buildSQL("think_form",array("abc:id","asdf:dfasdf"),1);


//$easy->out($easy->cfg);
//echo $easy->C("host");

//$easy->db->update("think_form",array("title:想你"),"id=44");

 //$arr=$easy->db->query2array("select  * from think_form limi 0,50"); 
 
 function bb($row)
 {
     print_r($row);
 }
  
 //$easy->alert($easy->getIP(),0);
 
 //$easy->db->delete("think_form","id=44");
 
//print_r( $easy->db->query2array("select * from think_form limit 0,50"));

//echo $easy->db->update("think_form",null,"id=46");

//print_r($easy->db->sqls);



//echo $easy->P("id");


//$rs=$easy->db->query2array("select * from think_form limit 0,50");
//$rs=Array("page"=>50,"total"=>100,"rows"=>$rs);

//$easy->out( $easy->xmlencode($rs));


 //  $easy->cookie("jqzhang","ok");
   
  // $easy->dump($rs,true);

  // $easy->dump($easy->getcontent("http://bbs.meizu.com/api/usercheck.php?user=s_jqzhang&pwd=123&t=0.34508396230633187"));


   
 //  $cache=new Cache;
  // print_r($cache->keys);
  // $cache->clear("aa");
  
 //$rs= $easy->db->query("select * from think_form limit 0,100");
 
 //$cache->set("aa",$easy);
 
// $easy=$cache->get("aa");
 
 //$easy->out("Hello World");

 //$easy->db->getfields("think_form");
/*
 $easy->dump( $easy->db->query2array("select * from think_form where title like '%20%' limit 0,1 ",true));
 
 $easy->dump( $easy->db->query2array("select * from think_form where title like '%20%' limit 0,10 ",true));
 $easy->dump( $easy->db->query2array("select * from think_form where title like '%20%' limit 0,11 ",true));
 $easy->dump( $easy->db->query2array("select * from think_form where title like '%20%' limit 0,12 ",true));
 $easy->dump( $easy->db->query2array("select * from think_form where title like '%20%' limit 0,13 ",true));
 $easy->dump( $easy->db->query2array("select * from think_form limit 0,20 ",true));
 
*/ 
//  $b=rand(5,40);
//$rs=$easy->db->query2array("select * from think_form where title like '$b'  limit 0,2000 ",false);


//$easy->dbcache->set("aa",$rs);

            

           
//echo $easy->db->cache->clear();

 //$easy->cache->clear_all();
  // $easy->out($easy->cache->cache_time);
  // $easy->cache->clear();
   
  // $easy->dump($easy->cache->keys);
  // $easy->dump($easy->cache->get("select * from think_form where title like '%20%' limit 0,1 "));
  
 // print_r( $easy->cache->keys[0]);

 //$easy->cache->clear();


//$easy->cache->clear_all();
//$easy->cache->clear();

//$easy->cache->set(""

//$easy->dbcache->clear();
//$easy->dbcache->clear_all();

//$easy->dump( $easy->dbcache->get("aa"));
//$out= $easy->dump( $easy->dbcache->get("aa"),false);
//$easy->writefile("aa.txt",serialize($easp));


//$easy->out($easy->use_mem()); 

//$easy->out($easy->run_time());

  

//$easy->writefile("bb.php",$easy->serialize( $easy->getcontent("http://news.163.com"),false,false),"w");
//$easy->writefile("bb.php",$easy->serialize( $easy->getcontent("http://news.163.com"),true,false),"w");
//$easy->writefile("bb.php",$easy->serialize( $easy,false,true),"w");
//$easy->out( $easy->unserialize($easy->readfile("bb.php"),false));

 //$sess=new  DbSession();
 
 //$sess->db=$easy->db;
 //$sess->dbcache=$easy->dbcache;



                         
                        // session_start();
 

?>